#coding=utf-8
import hashlib


class PasswordVerify:
    _salt = '1234'

    def __init__(self,password):
        self.secert_str = self._calc_secert(password)

    @staticmethod
    def _calc_secert(password):
        m = hashlib.md5()
        m.update(password+PasswordVerify._salt)
        return m.hexdigest()

    def verify(self,secert_str):
        if self.secert_str == secert_str:
            return True
        else:
            return False